amd/iommu: remove hidden AMD inclusive mappings
authorRoger Pau Monné <roger.pau@citrix.com>
Tue, 2 Oct 2018 15:02:33 +0000 (17:02 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 2 Oct 2018 15:02:33 +0000 (17:02 +0200)
commitd677097dc12c15785db8d988253837d0ee7347f4
treebb2d12335c86fc5acb1f5287f10dc467aaed2f19
parent8ce6ba37d6bd8959e0d00b92103c85cc662f6afd
amd/iommu: remove hidden AMD inclusive mappings

And just rely on arch_iommu_hwdom_init to setup the correct inclusive
mappings as it's done for Intel.

AMD has code in amd_iommu_hwdom_init to setup inclusive mappings up to
max_pdx, remove this since it's now a duplication of
arch_iommu_hwdom_init. Note that AMD mapped every page with a valid
mfn up to max_pdx, arch_iommu_hwdom_init will only do so for memory
below 4GB, so this is a functional change for AMD.

Move the default setting of iommu_hwdom_{inclusive/reserved} to
arch_iommu_hwdom_init since the defaults are now the same for both
Intel and AMD.

Reported-by: Paul Durrant <paul.durrant@citrix.com>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Acked-by: Suravee Suthikulpanit <suravee.suthikupanit@amd.com>
xen/drivers/passthrough/amd/pci_amd_iommu.c
xen/drivers/passthrough/vtd/iommu.c
xen/drivers/passthrough/x86/iommu.c